package st.business.tepth.business.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangyu
 * @date 2019/3/8
 */
public class DiagnoseBean implements Parcelable {
    /**
     * repair_id : 107
     * gmt_create : 2019-03-26 20:01:01
     * reference_id : 3
     * type : 0
     * gmt_modified : 2019-03-26 20:01:05
     * relation_state : 0
     * user_id : 12
     * name : 轮胎坏了
     * alias : 3
     * id : 50
     * describe :
     * repair_task_id : 24
     * repair_phenomenon_id : 13
     */
    private int repair_id;
    private String gmt_create;
    private int reference_id;
    private int type;
    private String gmt_modified;
    private int relation_state;
    private int user_id;
    private String name;
    private String alias;
    private int id;
    private String describe;
    private int repair_task_id;
    private int repair_phenomenon_id;
    private List<ProgramBean> planList;
    //是否自定义
    private boolean isManual = false;
    //是否是临时诊断
    private boolean isTemp = false;

    public List<ProgramBean> getPlanList() {
        return planList;
    }

    public void setPlanList(List<ProgramBean> planList) {
        this.planList = planList;
    }

    public boolean isManual() {
        return isManual;
    }

    public void setManual(boolean manual) {
        isManual = manual;
    }

    public boolean isTemp() {
        return isTemp;
    }

    public void setTemp(boolean temp) {
        isTemp = temp;
    }

    public int getRepair_id() {
        return repair_id;
    }

    public void setRepair_id(int repair_id) {
        this.repair_id = repair_id;
    }

    public String getGmt_create() {
        return gmt_create;
    }

    public void setGmt_create(String gmt_create) {
        this.gmt_create = gmt_create;
    }

    public int getReference_id() {
        return reference_id;
    }

    public void setReference_id(int reference_id) {
        this.reference_id = reference_id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getGmt_modified() {
        return gmt_modified;
    }

    public void setGmt_modified(String gmt_modified) {
        this.gmt_modified = gmt_modified;
    }

    public int getRelation_state() {
        return relation_state;
    }

    public void setRelation_state(int relation_state) {
        this.relation_state = relation_state;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public int getRepair_task_id() {
        return repair_task_id;
    }

    public void setRepair_task_id(int repair_task_id) {
        this.repair_task_id = repair_task_id;
    }

    public int getRepair_phenomenon_id() {
        return repair_phenomenon_id;
    }

    public void setRepair_phenomenon_id(int repair_phenomenon_id) {
        this.repair_phenomenon_id = repair_phenomenon_id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.repair_id);
        dest.writeString(this.gmt_create);
        dest.writeInt(this.reference_id);
        dest.writeInt(this.type);
        dest.writeString(this.gmt_modified);
        dest.writeInt(this.relation_state);
        dest.writeInt(this.user_id);
        dest.writeString(this.name);
        dest.writeString(this.alias);
        dest.writeInt(this.id);
        dest.writeString(this.describe);
        dest.writeInt(this.repair_task_id);
        dest.writeInt(this.repair_phenomenon_id);
        dest.writeList(this.planList);
        dest.writeByte(this.isManual ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isTemp ? (byte) 1 : (byte) 0);
    }

    public DiagnoseBean() {
    }

    protected DiagnoseBean(Parcel in) {
        this.repair_id = in.readInt();
        this.gmt_create = in.readString();
        this.reference_id = in.readInt();
        this.type = in.readInt();
        this.gmt_modified = in.readString();
        this.relation_state = in.readInt();
        this.user_id = in.readInt();
        this.name = in.readString();
        this.alias = in.readString();
        this.id = in.readInt();
        this.describe = in.readString();
        this.repair_task_id = in.readInt();
        this.repair_phenomenon_id = in.readInt();
        this.planList = new ArrayList<ProgramBean>();
        in.readList(this.planList, ProgramBean.class.getClassLoader());
        this.isManual = in.readByte() != 0;
        this.isTemp = in.readByte() != 0;
    }

    public static final Parcelable.Creator<DiagnoseBean> CREATOR = new Parcelable.Creator<DiagnoseBean>() {
        @Override
        public DiagnoseBean createFromParcel(Parcel source) {
            return new DiagnoseBean(source);
        }

        @Override
        public DiagnoseBean[] newArray(int size) {
            return new DiagnoseBean[size];
        }
    };
}
